package com.UMLife.me.model;



public class Registration {
	String  msg;
	private String respone="";
	private Communication c = null;
	
	
	/**
	 * 提交用户注册信息
	 * @param name 名字
	 * @param cellphone 电话号码
	 * @param psw 密码
	 * @param gender  性别
	 * @param job 工作
	 * @param city 城市
	 * @return
	 */
	
	public boolean registration(String name,String cellphone,String psw,String age,String gender,String job,String city)
	{
		//TODO
		msg="1"+"|"+name+"|"+cellphone+"|"+psw+"|"+age+"|"+gender+"|"+job+"|"+city;
		c = new Communication();
    	Thread thread=new Thread(c);
    	c.Setmsg(msg);
        c.SetNb(1);
    	thread.start();
    	try {
			thread.join();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	this.respone=c.Getrespone1();

		if(respone.equals("1")) return true;
		else return false;
		
	}
}
